<!--
核心原理
    - ::before
    - 旋转中心：左下角
    - 父容器overflow:hidden;
    - 记得加过渡效果
-->
<style>
  * {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
  }
  div {
    overflow: hidden;
    float: left;
    width: 200px;
    height: 200px;
    margin-left: 10px;
    background-color: skyblue;
  }
  div::before {
    content: "";
    display: block;
    width: 200px;
    height: 200px;
    background-color: orangered;
    transform: rotate(90deg);
    transform-origin: left bottom;
    transition: all 0.2s;
  }
  div:hover::before {
    transform: rotate(0);
  }
</style>

<div></div>
<div></div>
<div></div>
